package com.sunday.boot3.user.center.provider.impl;

import com.sunday.boot3.user.center.controller.UserController;
import com.sunday.boot3.user.center.pojo.dto.user.*;
import com.sunday.boot3.user.center.provider.UserProvider;
import com.sunday.common.core.remoting.base.page.PageResultDTO;
import com.sunday.common.core.remoting.base.response.Response;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;

/**
 * @Description: 用户表 provider impl 层
 * @author: zsy
 * @Create: 2024/09/22 16:24:39
 */
@Slf4j
@DubboService
@RequiredArgsConstructor
public class UserProviderImpl implements UserProvider {

    private final UserController userController;

    @Override
    public Response<GetAuthUserResDTO> getAuthUser(GetAuthUserReqDTO getAuthUserReqDTO) {
        return userController.getAuthUser(getAuthUserReqDTO);
    }

    /**
     * @Description: 新增 用户表 数据
     * @Param: [saveUserReqDTO]
     * @Return: com.sunday.common.core.remoting.base.response.Response
     * @Author: zsy
     * @Time: 2024/09/22 16:24:39
     */
    @Override
    public Response save(SaveUserReqDTO saveUserReqDTO) {
        return userController.save(saveUserReqDTO);
    }

    /**
     * @Description: 删除 用户表 数据
     * @Param: [removeUserReqDTO]
     * @Return: com.sunday.common.core.remoting.base.response.Response
     * @Author: zsy
     * @Time: 2024/09/22 16:24:39
     */
    @Override
    public Response remove(RemoveUserReqDTO removeUserReqDTO) {
        return userController.remove(removeUserReqDTO);
    }

    /**
     * @Description: 修改 用户表 数据
     * @Param: [updateUserReqDTO]
     * @Return: com.sunday.common.core.remoting.base.response.Response
     * @Author: zsy
     * @Time: 2024/09/22 16:24:39
     */
    @Override
    public Response update(UpdateUserReqDTO updateUserReqDTO) {
        return userController.update(updateUserReqDTO);
    }

    /**
     * @Description: 获取 用户表 分页列表数据
     * @Param: [pageUserReqDTO]
     * @Return: com.sunday.common.core.remoting.base.response.Response<com.sunday.common.core.remoting.base.page.PageResultDTO < com.sunday.boot3.user.center.pojo.dto.user.PageUserResDTO>>
     * @Author: zsy
     * @Time: 2024/09/22 16:24:39
     */
    @Override
    public Response<PageResultDTO<PageUserResDTO>> page(PageUserReqDTO pageUserReqDTO) {
        return userController.page(pageUserReqDTO);
    }

}